vec4 simpleLanczosFilter(sampler3D volume, in VOLUME_STRUCT volumeStruct, in vec3 sampleOrg) {
	int radius = 2;
	float PI = 3.1415926535;
	vec4 result = getVoxel(volume, volumeStruct, sampleOrg);
	if (radius < 1) return result;
	result.a = 0.0;

	vec3 offset, lanczos, arg, i ,t;

	// convolution-sum (3D)
	for (int x = -radius; x <= radius; x++) {
        for (int y = -radius; y <= radius; y++) {
            for (int z = -radius; z <= radius; z++) {
				offset = vec3(x, y, z);
				t = sampleOrg * volumeStruct.datasetDimensions_;
				i = offset + t;
				i = round(i);
				arg = PI * (t - i);
				// calculate lanczos(arg)
				for (int k = 0; k < 3; k++) {
					if (arg[k]!=0) {
						lanczos[k] = sin(arg[k]) / arg[k];
						lanczos[k] *= sin(arg[k] / radius) / (arg[k] / radius);
					}
                    else lanczos[k] = 1.0;
                }
				result.a += getVoxel(volume, volumeStruct, i / volumeStruct.datasetDimensions_).a  * lanczos.x  * lanczos.y * lanczos.z;
			}
		}
	}

	return result;
}